package com.wr.api.impl;

import com.wr.api.AInterface;
import org.apache.dubbo.config.annotation.Service;
import org.apache.dubbo.rpc.RpcContext;

/**
 * @author 王瑞
 * @description: TODO
 * @date 2020/4/16  10:21
 */
@Service
public class AInterfaceimpl implements AInterface {

    public String sayHello_A(String name) {
        String host = RpcContext.getContext().getAttachment("remoteHost");
        return "服务提供者A的方法被调用,当前消费者的ip是："+host+".内容：[sayHello_A:"+name+"]";
    }
}
